---
title: Button
description: Displays a button or a component that looks like a button.
kobalte: https://kobalte.dev/docs/core/components/button
---

<ComponentPreview name="button-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>

<TabsContent value="cli">

```bash
npx solidui-cli@latest add button
```

</TabsContent>

<TabsContent value="manual">
<Steps>

<Step>Install the following dependencies: </Step>

```bash
pnpm install @kobalte/core
```

<Step>Copy and paste the following code into your project: </Step>

<ComponentSource name="button" />

</Steps>
</TabsContent>

</Tabs>

## Usage

```tsx
import { Button } from "~/components/ui/button"
```

```tsx
<Button variant="outline">Button</Button>
```

### Link

You can use the `buttonVariants` helper to create a link that looks like a button.

```tsx
import { A } from "solid-start"
import { buttonVariants } from "~/components/ui/button"
```

```tsx
<A class={buttonVariants({ variant: "outline" })}>Click here</A>
```
